﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SimpleActor
{
    public abstract class ActorProxyBase<TServant> : IActor
    {
        private readonly IMessageScheduler<TServant> scheduler;

        protected ActorProxyBase(IMessageScheduler<TServant> scheduler)
        {
            this.scheduler = scheduler;
        }

        protected IMessageScheduler<TServant> Scheduler
        {
            get { return scheduler; }
        }

        public Task Start()
        {
            var ret = Scheduler.Start();
            return ret;
        }

        public Task Stop()
        {
            var ret = Scheduler.Stop();
            return ret;
        }
    }
}
